﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace Sinacor.OMM.Receptor.CommunicationChannel
{

    /// <summary>
    /// Manage the channels
    /// </summary>
    public class CommunicationChannelManager : IDisposable
    {

        private Thread _communicationChannelThread;
        private ParameterizedThreadStart _communicationChannelHandler;
        private Dictionary<String, ICommunicationChannel> _communicationChannels;

        #region Public Methods

        /// <summary>
        /// Start
        /// </summary>
        public void Start()
        {
            this.CreateCommunicationChannels();
            _communicationChannels = new Dictionary<string, ICommunicationChannel>();
        }

        /// <summary>
        /// Stop
        /// </summary>
        public void Stop()
        {

        }

        #endregion

        #region Private Methods

        /// <summary>
        /// Create communication channels
        /// </summary>
        private void CreateCommunicationChannels()
        {
            foreach (OMM.Configuration.Receptor.CommunicationChannel channel in ReceptorConfigurationManager.ReceptorConfiguration.CommunicationChannels)
            {

             
            }
        }

        private void StartCommunicationChannel(object channelConfiguration)
        {

        }

        #endregion

        #region IDisposable Members

        public void Dispose()
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
